package blackhouse;

import java.lang.reflect.Array;
import java.util.Arrays;

public class PrintTest
{
	public static void main(String[] args)  {
//		int [] a1 = new int[]{1,2,3};
		int a1[] = {1,2,3};
		Integer [] a2 =new Integer[]{0,1,5,4,8};
		String [] a4 ={"a","b","c"};
		System.out.println(Arrays.asList(a1));
		//System.out.println(Arrays.asList(a2));
		System.out.println(a1.getClass().getName());
		System.out.println(Arrays.asList(a4));	
		System.out.println(void.class.getName());
	   printObject(a1);
	}
	private static void printObject(Object obj) {
		Class clazz = obj.getClass();
		if(clazz.isArray()){
			int len = Array.getLength(obj);
			for(int i=0;i<len;i++){
				System.out.println(Array.get(obj, i));
			}
		}else{
			System.out.println(obj);
		}
			}
}
